﻿Imports BE = BusinessEntities
Imports BusinessLogicLayer
Partial Class buscarRendicion
    Inherits System.Web.UI.Page
    Dim str_error As String

    Dim itemgridview As GridViewRow

    Dim etiqueta As System.Web.UI.WebControls.Label

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            buscarRendiciones()
        End If

    End Sub


    Sub buscarRendiciones()
        Dim bean As New BE.UsuarioDTO
        Dim negocioRendicion As New RendicionesBL

        Dim usu As Integer = Session("USUARIO")
        bean.CodigoUsuario = usu

        Try
            gvdBuscarRendiciones.DataSource = negocioRendicion.buscar_Rendicion(bean)
            gvdBuscarRendiciones.DataBind()

        Catch ex As Exception
            str_error = negocioRendicion.CapturaError

            Response.Redirect("Errores.aspx?par=" & str_error)
        Finally
            negocioRendicion = Nothing

        End Try
        

    End Sub

    Protected Sub lbRendicion_Click(ByVal sender As Object, ByVal e As System.EventArgs)

        Dim a As String = 100

        'PopUpRendiciones.aspx?par={0}
        Dim script As String = "<script language=Javascript>"
        script += "window.showModalDialog('buscarRendicion.aspx',null,'width=500,height=500,scrollbars=yes,resizable=no,location=center');"
        script += "</script>"

        Page.ClientScript.RegisterStartupScript(Me.GetType(), "script", script)

        '"window.showModalDialog('PopUpRendiciones.aspx?par={0},null,width=500,height=500,scrollbars=yes,resizable=no,location=center');"

    End Sub
End Class
